<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <center>
            <p:panel header="#{resourcesController.extractResource('AS_LOG')}" 
                       style="width:680px">

                <p:dataTable value="#{loggingBean.getLogs()}"
                             var="logEntry"
                             style="font-size: 11px"
                             id="logTable">
                    
                    <f:facet name="header">
                      <div align="left"> 
                        <p:graphicImage width="32" url="/images/logs.png"/>
                        <p:commandLink value="#{resourcesController.extractResource('LOAD_LOG')}" 
                                       ajax="false"
                                       async="true"
                                       style="font-size: 12px; vertical-align: super">
                           
                            <p:fileDownload contentDisposition="inline" value="#{loggingBean.logFileContent}"/>
                        </p:commandLink>
                      </div> 
                    </f:facet>
                    
                    
                    <p:column> 
                      
                        <f:facet name="header">
                             <h:outputText value="#{resourcesController.extractResource('INFO')}"/>
                        </f:facet>
                        <div style="width: 600px; word-wrap: break-word;"> 
                            <h:outputText value="#{logEntry}"/> 
                        </div>  
                    </p:column>
                    
                </p:dataTable>
                     
            </p:panel>
  
        </center>
    </h:body>
</html>

